package model;

/**
 * Customer.java
 * Purpose: Represents a customer
 * 
 * @author Matthias Diagre
 * @version 0.1 10/01/2012
 */

public class Customer {
	/* Identifies the order */
	private long id;
	/* The name of the customer */
	private String name;
	/* The address of the customer */
	private String address;
	/* The account that can be linked to the customer */
	private Account account;
	/* The account id of the customer */
	private long accountId;

	/** Constructs a new customer */
	public Customer () {
	}
	
	/** Constructs a new customer */
	public Customer(long id, String name) {
		this.id = id;
		this.name = name;
	}
	
	/** Returns the id of the customer */
	public long getId(){
		return this.id;
	}

	/** Sets the id of the customer */
	public void setId(long id){
		this.id = id;
	}
	
	/** Returns the name of the customer */
	public String getName (){
		return this.name;
	}
	
	/** Sets the name of the customer */
	public void setName (String name){
		this.name = name;
	}
	
	/** Returns the address of the customer */
	public String getAddress (){
		return this.address;
	}
	
	/** Sets the address of the customer */
	public void setAddress(String address){
		this.address = address;
	}
	
	/** Returns the account of the customer */
	public Account getAccount() {
		return account;
	}
	
	/** Sets the account of the customer */
	public void setAccount(Account account) {
		this.account = account;
	}

	/** Returns the id of the account */
	public long getAccountId() {
		return accountId;
	}

	/** Sets the id of the account */
	public void setAccountId(long accountId) {
		this.accountId = accountId;
	}

	/** Returns a string representation of the customer */
	@Override
	public String toString() {
		return String.format("%s", this.name);
	}
}